package com.study.happystudy.mapper;

import com.study.happystudy.po.Rank;
import com.study.happystudy.po.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {
    User Login(String phone, String userpassword);

    String getUserSalt(String phone);

    int upUserPwd(String phone, String userpassword);

    int register(String type,String nickname, String name, String phone,
                 String password, String institution, String salt,char gender);//注册
    void updateUser(String nickname,String headPortrait,String introduction,int age,String institution,char gender,int id);
    void deleteUser(Integer id);
    List<User> findUserByContains(String searchTerm);
    List<User> findUserByEqual(String searchTerm);
    User findUserById(Integer id);
    void updatePoints(Integer id, Integer points);
    List<Rank> getFriendRank(Integer uid);
    List<Rank> getAllRank();

    int sendAI(String SendText,String ResulyText,int tokens);
}
